Don't set parent/child relationship for tooltip windows since that moves
authorRichard Hult <richard@imendio.com>
Sat, 16 Jun 2007 15:38:33 +0000 (15:38 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sat, 16 Jun 2007 15:38:33 +0000 (15:38 +0000)
2007-06-16  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_transient_for):
Don't set parent/child relationship for tooltip windows since that
moves the parent window to the front, due to the tooltip having a
high window level.

svn path=/trunk/; revision=18158

ChangeLog
gdk/quartz/gdkwindow-quartz.c

index d7383cda571c5edbccca661ee4df2677d9b51b5d..58afdf812e9557f6c9cbb1f5e79bf4bd61e30cd1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-16  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkwindow-quartz.c (gdk_window_set_transient_for):
+       Don't set parent/child relationship for tooltip windows since that
+       moves the parent window to the front, due to the tooltip having a
+       high window level.
+
 2007-06-16  Christian Persch  <chpe@gnome.org>
 
        * gtk/gtkbuilder.c: (gtk_builder_real_get_type_from_name),
index e7c066a02cdd4dfe2a7682e84f621425e664abba..5329ff0cf11ab10851a58577a663fd388cb52a5a 100644 (file)
@@ -1576,8 +1576,17 @@ gdk_window_set_transient_for (GdkWindow *window,
       /* We save the parent because it needs to be unset/reset when
        * hiding and showing the window. 
        */
-      window_impl->transient_for = g_object_ref (parent);
-      [parent_impl->toplevel addChildWindow:window_impl->toplevel ordered:NSWindowAbove];
+
+      /* We don't set transients for tooltips, they are already
+       * handled by the window level being the top one. If we do, then
+       * the parent window will be brought to the top just because the
+       * tooltip is, which is not what we want.
+       */
+      if (gdk_window_get_type_hint (window) != GDK_WINDOW_TYPE_HINT_TOOLTIP)
+        {
+          window_impl->transient_for = g_object_ref (parent);
+          [parent_impl->toplevel addChildWindow:window_impl->toplevel ordered:NSWindowAbove];
+        }
     }
   
   GDK_QUARTZ_RELEASE_POOL;